export const comsType = {
  FORM_HEADER: 'FORM_HEADER',
  FORM_FOOTER: 'FORM_FOOTER',
  FOOTER: 'FOOTER',
  TEXT: 'TEXT',
  DATE: 'DATE',
  TIME: 'TIME',
  TEXTAREA: 'TEXTAREA',
  ATTACHMENT: 'ATTACHMENT',
  COMBOBOX: 'COMBOBOX',
  SELECT: 'SELECT',
  PICTURE: 'PICTURE',
  DATATABLE: 'DATATABLE',
  NAME: 'NAME',
  MOBILE: 'MOBILE',
  EMAIL: 'EMAIL',
  COLUMNPANEL2: 'COLUMNPANEL2',
  COLUMNPANEL3: 'COLUMNPANEL3',
  ADDRESS: 'ADDRESS',
  MAP: 'MAP',
  LBS: 'LBS',
  SIGNATURE: 'SIGNATURE',
  NUMBER: 'NUMBER',
  TELEPHONE: 'TELEPHONE',
  TABLELAYOUT: 'TABLELAYOUT',
  SINGLEBROWSER_HRM: 'SINGLEBROWSER_HRM',
  MULTIBROWSER_HRM: 'MULTIBROWSER_HRM',
  BOARD_ELEMENT: 'BOARD_ELEMENT',
  HIDDEN_INPUT: 'HIDDEN_INPUT',
  DESCRIPTION: 'DESCRIPTION',
};

const { TEXT, DATE, TIME, COMBOBOX, SELECT, TEXTAREA, NUMBER, SINGLEBROWSER_HRM, MULTIBROWSER_HRM, NAME, MOBILE, EMAIL, TELEPHONE, ADDRESS } = comsType;

export const hasReadOnlyComs = [TEXT, DATE, TIME, COMBOBOX, SELECT, TEXTAREA, NUMBER, SINGLEBROWSER_HRM, MULTIBROWSER_HRM, NAME, MOBILE, EMAIL, TELEPHONE, ADDRESS];

export const rm_tabs = {
  PROPS: 'props',
  THEME: 'theme',
};

export const selectType = {
  CURRENT: 'current',
  APPOINT: 'appoint',
  EMPTY: 'empty',
};

export const viewTypes = {
  PC: 'desktop',
  MOBILE: 'mobile',
  MOBILE_WX: 'mobile_wx', // 微信中 且wx jssdk可用状态下
  READONLY: 'readonly',
};

// design与view模式下共用View.js
export const modeTypes = {
  DESIGN: 'design',
  VIEW: 'view',
};

export const formRules = {
  REQUIRED: 'required',
};

// WeaSelect detailtype属性值
export const detailTypes = {
  CHECKBOX:2,
  RADIO: 3,
};

// combobox与select key
export const OTHER = '-1'; // 其他选项
export const CUSTOM = '-1'; // 自定义选项

export const LIB_PATH = '/edc/lib';
export const IMG_PATH = '/edc/images';

export const ruleTypes = {
  FIELD: 'field',
  JUMP: 'jump',
};

//接口返回code类型
export const resultTypes = {
  ERROR: 0,
  NORMAL: 1,
  NORIGHT: 2,
  EXAMINING: 3,
  NOEDIT: 4,
};
//接口返回错误信息类型
export const errorTypes = {
  PAGE: 'PAGE',
};

export const ACCEPT_TYPE = {
  DOC: 'txt、pdf、doc、docx、xls、xlsx、ppt、pptx、wps、rtf、hlp',
  IMAGE: 'jpg、jpeg、png、gif、bmp、psd、tif',
  VIDEO: 'mkv、mp4、avi、swf、wmv、rmvb、mov、mpg',
  AUDIO: 'mp3、flac、ape、wma、wav、aac、m4a、au、ram、mmf、aif',
  COMPRESS: 'rar、zip、7z、gz、arj、z',
};

export const DragKey = {
  COM: 'com', // 设计器组件
  ComCard: 'com-card', // 左侧组件卡片
  DataTable: 'datatable',
  ColumnPanel: 'columnpanel',
  TableLayout: 'tablelayout',
};

export const unitWidthProp = 1 / 3;

export const editType = {
  NO_EDIT: 'NO_EDIT',
  CONFIRM_EDIT: 'CONFIRM_EDIT',
  DIRECT_EDIT: 'DIRECT_EDIT',
};

export const dragDelayTime = 90;

export const Drag_Disabled_ClassName = 'wea-edc-drag-disabled';
